package qc.module.qms.mapper;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import qc.module.qms.dto.station.StationDto;
import qc.module.qms.entity.QmsStation;

import java.util.List;

/**
 * ExchangeStationMapper
 *
 * @author QuCheng Tech
 * @since 2024/1/24
 */
@Mapper
public interface QmsStationMapper {
    QmsStationMapper MAPPER = Mappers.getMapper(QmsStationMapper.class);

    QmsStation toEntity(StationDto dto);

    @Mapping(target = "params", source = "params")
    StationDto toDto(QmsStation en);

    List<StationDto> toDtoList(List<QmsStation> list);
}
